<!DOCTYPE html>
<html>
<head>
	<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
	<meta name="generator" content="ApiGen 2.4.0">

	<title>Class RedMVC\Image | RedMVC Framework</title>

	<script type="text/javascript" src="resources/combined.js?1841058525"></script>
	<script type="text/javascript" src="elementlist.js?356506387"></script>
	<script type="text/javascript">
		var ApiGen = ApiGen || {};
		ApiGen.options = {"elementDetailsCollapsed":true,"elementsOrder":"natural"};
	</script>
	<link rel="stylesheet" type="text/css" media="all" href="resources/style.css?3295955786">

</head>

<body>
<div id="left">
	<div id="menu">
		<a href="index.html" title="Overview"><span>Overview</span></a>

		<div id="groups">

			<h3>Namespaces</h3>
			<ul>
				<li><a href="namespace-PHP.html">PHP</a>
						</li>
				<li class="active"><a href="namespace-RedMVC.html">RedMVC</a>
						<span></span>
						<ul>
				<li><a href="namespace-RedMVC.Auth.html">Auth</a>
						<span></span>
						<ul>
				<li><a href="namespace-RedMVC.Auth.Adapter.html">Adapter</a>
						</li>
				<li><a href="namespace-RedMVC.Auth.Storage.html">Storage</a>
						</li>
							</ul></li>
				<li><a href="namespace-RedMVC.CodeGenerator.html">CodeGenerator</a>
						</li>
				<li><a href="namespace-RedMVC.Controller.html">Controller</a>
						</li>
				<li><a href="namespace-RedMVC.DataTable.html">DataTable</a>
						</li>
				<li><a href="namespace-RedMVC.Db.html">Db</a>
						</li>
				<li><a href="namespace-RedMVC.Drawing.html">Drawing</a>
						<span></span>
						<ul>
				<li><a href="namespace-RedMVC.Drawing.Color.html">Color</a>
						</li>
							</ul></li>
				<li><a href="namespace-RedMVC.Event.html">Event</a>
						</li>
				<li><a href="namespace-RedMVC.Feed.html">Feed</a>
						</li>
				<li><a href="namespace-RedMVC.Form.html">Form</a>
						<span></span>
						<ul>
				<li><a href="namespace-RedMVC.Form.Element.html">Element</a>
						</li>
				<li><a href="namespace-RedMVC.Form.Filter.html">Filter</a>
						</li>
				<li><a href="namespace-RedMVC.Form.Validator.html">Validator</a>
						</li>
							</ul></li>
				<li><a href="namespace-RedMVC.Http.html">Http</a>
						</li>
				<li><a href="namespace-RedMVC.Mail.html">Mail</a>
						</li>
				<li><a href="namespace-RedMVC.Model.html">Model</a>
						</li>
				<li><a href="namespace-RedMVC.Router.html">Router</a>
						</li>
							</ul></li>
			</ul>
		</div>

		<hr>

		<div id="elements">
			<h3>Classes</h3>
			<ul>
				<li><a href="class-RedMVC.Acl.html">Acl</a></li>
				<li><a href="class-RedMVC.Auth.html">Auth</a></li>
				<li><a href="class-RedMVC.Bootstrap.html">Bootstrap</a></li>
				<li><a href="class-RedMVC.Browser.html">Browser</a></li>
				<li><a href="class-RedMVC.Config.html">Config</a></li>
				<li><a href="class-RedMVC.DataTable.html">DataTable</a></li>
				<li><a href="class-RedMVC.Feed.html">Feed</a></li>
				<li><a href="class-RedMVC.File.html">File</a></li>
				<li><a href="class-RedMVC.Form.html">Form</a></li>
				<li class="active"><a href="class-RedMVC.Image.html">Image</a></li>
				<li><a href="class-RedMVC.Layout.html">Layout</a></li>
				<li><a href="class-RedMVC.Locale.html">Locale</a></li>
				<li><a href="class-RedMVC.Mail.html">Mail</a></li>
				<li><a href="class-RedMVC.Navigation.html">Navigation</a></li>
				<li><a href="class-RedMVC.Page.html">Page</a></li>
				<li><a href="class-RedMVC.Paypal.html">Paypal</a></li>
				<li><a href="class-RedMVC.Random.html">Random</a></li>
				<li><a href="class-RedMVC.Registry.html">Registry</a></li>
				<li><a href="class-RedMVC.Session.html">Session</a></li>
				<li><a href="class-RedMVC.SessionMsg.html">SessionMsg</a></li>
				<li><a href="class-RedMVC.Translate.html">Translate</a></li>
				<li><a href="class-RedMVC.View.html">View</a></li>
				<li><a href="class-RedMVC.ViewHelper.html">ViewHelper</a></li>
			</ul>





		</div>
	</div>
</div>

<div id="splitter"></div>

<div id="right">
<div id="rightInner">
	<form id="search">
		<input type="hidden" name="cx" value="">
		<input type="hidden" name="ie" value="UTF-8">
		<input type="text" name="q" class="text">
		<input type="submit" value="Search">
	</form>

	<div id="navigation">
		<ul>
			<li>
				<a href="index.html" title="Overview"><span>Overview</span></a>
			</li>
			<li>
				<a href="namespace-RedMVC.html" title="Summary of RedMVC"><span>Namespace</span></a>
			</li>
			<li class="active">
<span>Class</span>			</li>
		</ul>
		<ul>
			<li>
				<a href="tree.html" title="Tree view of classes, interfaces, traits and exceptions"><span>Tree</span></a>
			</li>
		</ul>
		<ul>
		</ul>
	</div>

<div id="content" class="class">
	<h1>Class Image</h1>

	<div class="description">
	
<p>Image class</p>

	</div>








	<div class="info">
		
		
		<b>Namespace:</b> <a href="namespace-RedMVC.html">RedMVC</a><br>

				<b>Category:</b>
				RedMVC<br>
				<b>Author:</b>
				Jan Fischer, bitWorking &lt;<a
href="mailto:info&#64;bitworking.de">info&#64;<!---->bitworking.de</a>&gt;<br>
		<b>Located at</b> <a href="source-class-RedMVC.Image.html#11" title="Go to source code">Image.php</a><br>
	</div>


	<table class="summary" id="methods">
	<caption>Methods summary</caption>
	<tr data-order="__construct" id="___construct">

		<td class="attributes"><code>
			
			 public 
			
			
			</code>
		</td>

		<td class="name"><div>
		<a class="anchor" href="#___construct">#</a>
		<code><a href="source-class-RedMVC.Image.html#25" title="Go to source code">__construct</a>( <span> <var>$xSize</var> = <span class="php-keyword1">null</span></span>, <span> <var>$ySize</var> = <span class="php-keyword1">null</span></span> )</code>

		<div class="description short">
			
		</div>

		<div class="description detailed hidden">
			






		</div>
		</div></td>
	</tr>
	<tr data-order="init" id="_init">

		<td class="attributes"><code>
			
			 public 
			
			
			</code>
		</td>

		<td class="name"><div>
		<a class="anchor" href="#_init">#</a>
		<code><a href="source-class-RedMVC.Image.html#33" title="Go to source code">init</a>( <span> <var>$xSize</var></span>, <span> <var>$ySize</var></span> )</code>

		<div class="description short">
			
		</div>

		<div class="description detailed hidden">
			






		</div>
		</div></td>
	</tr>
	<tr data-order="fromFile" id="_fromFile">

		<td class="attributes"><code>
			
			 public static
			
			
			</code>
		</td>

		<td class="name"><div>
		<a class="anchor" href="#_fromFile">#</a>
		<code><a href="source-class-RedMVC.Image.html#40" title="Go to source code">fromFile</a>( <span> <var>$imgFile</var></span> )</code>

		<div class="description short">
			
		</div>

		<div class="description detailed hidden">
			






		</div>
		</div></td>
	</tr>
	<tr data-order="getImg" id="_getImg">

		<td class="attributes"><code>
			
			 public 
			
			
			</code>
		</td>

		<td class="name"><div>
		<a class="anchor" href="#_getImg">#</a>
		<code><a href="source-class-RedMVC.Image.html#66" title="Go to source code">getImg</a>( )</code>

		<div class="description short">
			
		</div>

		<div class="description detailed hidden">
			






		</div>
		</div></td>
	</tr>
	<tr data-order="_createImg" id="__createImg">

		<td class="attributes"><code>
			
			 protected 
			
			
			</code>
		</td>

		<td class="name"><div>
		<a class="anchor" href="#__createImg">#</a>
		<code><a href="source-class-RedMVC.Image.html#70" title="Go to source code">_createImg</a>( <span> <var>$xSize</var></span>, <span> <var>$ySize</var></span> )</code>

		<div class="description short">
			
		</div>

		<div class="description detailed hidden">
			






		</div>
		</div></td>
	</tr>
	<tr data-order="setSize" id="_setSize">

		<td class="attributes"><code>
			
			 public 
			
			
			</code>
		</td>

		<td class="name"><div>
		<a class="anchor" href="#_setSize">#</a>
		<code><a href="source-class-RedMVC.Image.html#81" title="Go to source code">setSize</a>( <span> <var>$xSize</var></span>, <span> <var>$ySize</var></span> )</code>

		<div class="description short">
			
		</div>

		<div class="description detailed hidden">
			






		</div>
		</div></td>
	</tr>
	<tr data-order="setWidth" id="_setWidth">

		<td class="attributes"><code>
			
			 public 
			
			
			</code>
		</td>

		<td class="name"><div>
		<a class="anchor" href="#_setWidth">#</a>
		<code><a href="source-class-RedMVC.Image.html#92" title="Go to source code">setWidth</a>( <span> <var>$xSize</var></span> )</code>

		<div class="description short">
			
		</div>

		<div class="description detailed hidden">
			






		</div>
		</div></td>
	</tr>
	<tr data-order="setHeight" id="_setHeight">

		<td class="attributes"><code>
			
			 public 
			
			
			</code>
		</td>

		<td class="name"><div>
		<a class="anchor" href="#_setHeight">#</a>
		<code><a href="source-class-RedMVC.Image.html#102" title="Go to source code">setHeight</a>( <span> <var>$ySize</var></span> )</code>

		<div class="description short">
			
		</div>

		<div class="description detailed hidden">
			






		</div>
		</div></td>
	</tr>
	<tr data-order="thumbnail" id="_thumbnail">

		<td class="attributes"><code>
			
			 public 
			
			
			</code>
		</td>

		<td class="name"><div>
		<a class="anchor" href="#_thumbnail">#</a>
		<code><a href="source-class-RedMVC.Image.html#112" title="Go to source code">thumbnail</a>( <span> <var>$maxPx</var></span>, <span> <var>$cropRatio</var> = <span class="php-keyword1">false</span></span>, <span> <var>$forceMaxPx</var> = <span class="php-keyword1">true</span></span> )</code>

		<div class="description short">
			
		</div>

		<div class="description detailed hidden">
			






		</div>
		</div></td>
	</tr>
	<tr data-order="fill" id="_fill">

		<td class="attributes"><code>
			
			 public 
			
			
			</code>
		</td>

		<td class="name"><div>
		<a class="anchor" href="#_fill">#</a>
		<code><a href="source-class-RedMVC.Image.html#156" title="Go to source code">fill</a>( <span> <var>$hexColor</var></span> )</code>

		<div class="description short">
			
		</div>

		<div class="description detailed hidden">
			






		</div>
		</div></td>
	</tr>
	<tr data-order="text" id="_text">

		<td class="attributes"><code>
			
			 public 
			
			
			</code>
		</td>

		<td class="name"><div>
		<a class="anchor" href="#_text">#</a>
		<code><a href="source-class-RedMVC.Image.html#160" title="Go to source code">text</a>( <span> <var>$fontFile</var></span>, <span> <var>$fontSize</var></span>, <span> <var>$text</var></span>, <span> <var>$hexColor</var> = <span class="php-quote">'#000000'</span></span>, <span><a href="class-RedMVC.Drawing.Point2D.html">RedMVC\Drawing\Point2D</a> <var>$point</var> = <span class="php-keyword1">null</span></span>, <span> <var>$angle</var> = <span class="php-num">0</span></span> )</code>

		<div class="description short">
			
		</div>

		<div class="description detailed hidden">
			






		</div>
		</div></td>
	</tr>
	<tr data-order="textImg" id="_textImg">

		<td class="attributes"><code>
			
			 public static
			
			
			</code>
		</td>

		<td class="name"><div>
		<a class="anchor" href="#_textImg">#</a>
		<code><a href="source-class-RedMVC.Image.html#172" title="Go to source code">textImg</a>( <span> <var>$fontFile</var></span>, <span> <var>$fontSize</var></span>, <span> <var>$text</var></span>, <span> <var>$padding</var> = <span class="php-num">0</span></span>, <span> <var>$hexColorFont</var> = <span class="php-quote">'#000000'</span></span>, <span> <var>$hexColorBg</var> = <span class="php-quote">'#ffffff7f'</span></span>, <span> <var>$angle</var> = <span class="php-num">0</span></span> )</code>

		<div class="description short">
			
		</div>

		<div class="description detailed hidden">
			






		</div>
		</div></td>
	</tr>
	<tr data-order="line" id="_line">

		<td class="attributes"><code>
			
			 public 
			
			
			</code>
		</td>

		<td class="name"><div>
		<a class="anchor" href="#_line">#</a>
		<code><a href="source-class-RedMVC.Image.html#217" title="Go to source code">line</a>( <span><a href="class-RedMVC.Drawing.Point2D.html">RedMVC\Drawing\Point2D</a> <var>$point1</var> = <span class="php-keyword1">null</span></span>, <span><a href="class-RedMVC.Drawing.Point2D.html">RedMVC\Drawing\Point2D</a> <var>$point2</var> = <span class="php-keyword1">null</span></span>, <span> <var>$hexColor</var> = <span class="php-quote">'#000000'</span></span>, <span> <var>$thickness</var> = <span class="php-num">1</span></span> )</code>

		<div class="description short">
			
		</div>

		<div class="description detailed hidden">
			






		</div>
		</div></td>
	</tr>
	<tr data-order="rectangle" id="_rectangle">

		<td class="attributes"><code>
			
			 public 
			
			
			</code>
		</td>

		<td class="name"><div>
		<a class="anchor" href="#_rectangle">#</a>
		<code><a href="source-class-RedMVC.Image.html#228" title="Go to source code">rectangle</a>( <span><a href="class-RedMVC.Drawing.Point2D.html">RedMVC\Drawing\Point2D</a> <var>$point1</var> = <span class="php-keyword1">null</span></span>, <span><a href="class-RedMVC.Drawing.Point2D.html">RedMVC\Drawing\Point2D</a> <var>$point2</var> = <span class="php-keyword1">null</span></span>, <span> <var>$hexColor</var> = <span class="php-quote">'#000000'</span></span>, <span> <var>$thickness</var> = <span class="php-num">1</span></span> )</code>

		<div class="description short">
			
		</div>

		<div class="description detailed hidden">
			






		</div>
		</div></td>
	</tr>
	<tr data-order="polygon" id="_polygon">

		<td class="attributes"><code>
			
			 public 
			
			
			</code>
		</td>

		<td class="name"><div>
		<a class="anchor" href="#_polygon">#</a>
		<code><a href="source-class-RedMVC.Image.html#244" title="Go to source code">polygon</a>( <span>array <var>$points</var></span>, <span> <var>$hexColor</var> = <span class="php-quote">'#000000'</span></span>, <span> <var>$thickness</var> = <span class="php-num">1</span></span> )</code>

		<div class="description short">
			
		</div>

		<div class="description detailed hidden">
			






		</div>
		</div></td>
	</tr>
	<tr data-order="ellipse" id="_ellipse">

		<td class="attributes"><code>
			
			 public 
			
			
			</code>
		</td>

		<td class="name"><div>
		<a class="anchor" href="#_ellipse">#</a>
		<code><a href="source-class-RedMVC.Image.html#254" title="Go to source code">ellipse</a>( <span><a href="class-RedMVC.Drawing.Point2D.html">RedMVC\Drawing\Point2D</a> <var>$centerPoint</var> = <span class="php-keyword1">null</span></span>, <span> <var>$width</var> = <span class="php-keyword1">null</span></span>, <span> <var>$height</var> = <span class="php-keyword1">null</span></span>, <span> <var>$hexColor</var> = <span class="php-quote">'#000000'</span></span>, <span> <var>$thickness</var> = <span class="php-num">1</span></span> )</code>

		<div class="description short">
			
		</div>

		<div class="description detailed hidden">
			






		</div>
		</div></td>
	</tr>
	<tr data-order="arc" id="_arc">

		<td class="attributes"><code>
			
			 public 
			
			
			</code>
		</td>

		<td class="name"><div>
		<a class="anchor" href="#_arc">#</a>
		<code><a href="source-class-RedMVC.Image.html#279" title="Go to source code">arc</a>( <span><a href="class-RedMVC.Drawing.Point2D.html">RedMVC\Drawing\Point2D</a> <var>$centerPoint</var> = <span class="php-keyword1">null</span></span>, <span> <var>$width</var> = <span class="php-keyword1">null</span></span>, <span> <var>$height</var> = <span class="php-keyword1">null</span></span>, <span> <var>$start</var> = <span class="php-num">0</span></span>, <span> <var>$end</var> = <span class="php-num">359</span></span>, <span> <var>$hexColor</var> = <span class="php-quote">'#000000'</span></span>, <span> <var>$thickness</var> = <span class="php-num">1</span></span> )</code>

		<div class="description short">
			
		</div>

		<div class="description detailed hidden">
			






		</div>
		</div></td>
	</tr>
	<tr data-order="getColorId" id="_getColorId">

		<td class="attributes"><code>
			
			 public 
			integer
			
			</code>
		</td>

		<td class="name"><div>
		<a class="anchor" href="#_getColorId">#</a>
		<code><a href="source-class-RedMVC.Image.html#299" title="Go to source code">getColorId</a>( <span>string <var>$hexColor</var></span> )</code>

		<div class="description short">
			
<p>gets color id from hex color</p>

		</div>

		<div class="description detailed hidden">
			
<p>gets color id from hex color</p>



				<h4>Parameters</h4>
				<div class="list"><dl>
					<dt><var>$hexColor</var></dt>
					<dd><code>string</code><br> example: #ff0000 or ff0000</dd>
				</dl></div>

				<h4>Returns</h4>
				<div class="list">
					<code>integer</code><br>
				</div>



		</div>
		</div></td>
	</tr>
	<tr data-order="_unlink" id="__unlink">

		<td class="attributes"><code>
			
			 protected 
			
			
			</code>
		</td>

		<td class="name"><div>
		<a class="anchor" href="#__unlink">#</a>
		<code><a href="source-class-RedMVC.Image.html#326" title="Go to source code">_unlink</a>( <span> <var>$fileName</var></span> )</code>

		<div class="description short">
			
		</div>

		<div class="description detailed hidden">
			






		</div>
		</div></td>
	</tr>
	<tr data-order="toGif" id="_toGif">

		<td class="attributes"><code>
			
			 public 
			
			
			</code>
		</td>

		<td class="name"><div>
		<a class="anchor" href="#_toGif">#</a>
		<code><a href="source-class-RedMVC.Image.html#332" title="Go to source code">toGif</a>( <span> <var>$fileName</var> = <span class="php-keyword1">null</span></span> )</code>

		<div class="description short">
			
		</div>

		<div class="description detailed hidden">
			






		</div>
		</div></td>
	</tr>
	<tr data-order="toJpg" id="_toJpg">

		<td class="attributes"><code>
			
			 public 
			
			
			</code>
		</td>

		<td class="name"><div>
		<a class="anchor" href="#_toJpg">#</a>
		<code><a href="source-class-RedMVC.Image.html#340" title="Go to source code">toJpg</a>( <span> <var>$fileName</var> = <span class="php-keyword1">null</span></span>, <span> <var>$quality</var> = <span class="php-num">75</span></span> )</code>

		<div class="description short">
			
		</div>

		<div class="description detailed hidden">
			






		</div>
		</div></td>
	</tr>
	<tr data-order="toPng" id="_toPng">

		<td class="attributes"><code>
			
			 public 
			
			
			</code>
		</td>

		<td class="name"><div>
		<a class="anchor" href="#_toPng">#</a>
		<code><a href="source-class-RedMVC.Image.html#348" title="Go to source code">toPng</a>( <span>string|null <var>$fileName</var> = <span class="php-keyword1">null</span></span>, <span>integer <var>$compression</var> = <span class="php-num">0</span></span>, <span>integer <var>$filters</var> = PNG_NO_FILTER</span> )</code>

		<div class="description short">
			
<p>saves image as png</p>

		</div>

		<div class="description detailed hidden">
			
<p>saves image as png</p>



				<h4>Parameters</h4>
				<div class="list"><dl>
					<dt><var>$fileName</var></dt>
					<dd><code>string|null</code></dd>
					<dt><var>$compression</var></dt>
					<dd><code>integer</code><br> 0 (no compression) -&gt; 9</dd>
					<dt><var>$filters</var></dt>
					<dd><code>integer</code></dd>
				</dl></div>




		</div>
		</div></td>
	</tr>
	<tr data-order="__deconstruct" id="___deconstruct">

		<td class="attributes"><code>
			
			 public 
			
			
			</code>
		</td>

		<td class="name"><div>
		<a class="anchor" href="#___deconstruct">#</a>
		<code><a href="source-class-RedMVC.Image.html#363" title="Go to source code">__deconstruct</a>( )</code>

		<div class="description short">
			
		</div>

		<div class="description detailed hidden">
			






		</div>
		</div></td>
	</tr>
	</table>







	<table class="summary" id="properties">
	<caption>Properties summary</caption>
	<tr data-order="_img" id="$_img">

		<td class="attributes"><code>
			
			protected 
			
		</code></td>

		<td class="name">
				<a href="source-class-RedMVC.Image.html#19" title="Go to source code"><var>$_img</var></a>
		</td>
		<td class="value"><code></code></td>
		<td class="description"><div>
			<a href="#$_img" class="anchor">#</a>

			<div class="description short">
				
			</div>

			<div class="description detailed hidden">
				

			</div>
		</div></td>
	</tr>
	<tr data-order="_xSize" id="$_xSize">

		<td class="attributes"><code>
			
			protected 
			
		</code></td>

		<td class="name">
				<a href="source-class-RedMVC.Image.html#20" title="Go to source code"><var>$_xSize</var></a>
		</td>
		<td class="value"><code></code></td>
		<td class="description"><div>
			<a href="#$_xSize" class="anchor">#</a>

			<div class="description short">
				
			</div>

			<div class="description detailed hidden">
				

			</div>
		</div></td>
	</tr>
	<tr data-order="_ySize" id="$_ySize">

		<td class="attributes"><code>
			
			protected 
			
		</code></td>

		<td class="name">
				<a href="source-class-RedMVC.Image.html#21" title="Go to source code"><var>$_ySize</var></a>
		</td>
		<td class="value"><code></code></td>
		<td class="description"><div>
			<a href="#$_ySize" class="anchor">#</a>

			<div class="description short">
				
			</div>

			<div class="description detailed hidden">
				

			</div>
		</div></td>
	</tr>
	<tr data-order="_imgFile" id="$_imgFile">

		<td class="attributes"><code>
			
			protected 
			
		</code></td>

		<td class="name">
				<a href="source-class-RedMVC.Image.html#22" title="Go to source code"><var>$_imgFile</var></a>
		</td>
		<td class="value"><code></code></td>
		<td class="description"><div>
			<a href="#$_imgFile" class="anchor">#</a>

			<div class="description short">
				
			</div>

			<div class="description detailed hidden">
				

			</div>
		</div></td>
	</tr>
	<tr data-order="_hasAlpha" id="$_hasAlpha">

		<td class="attributes"><code>
			
			protected 
			boolean
		</code></td>

		<td class="name">
				<a href="source-class-RedMVC.Image.html#23" title="Go to source code"><var>$_hasAlpha</var></a>
		</td>
		<td class="value"><code><span class="php-keyword1">false</span></code></td>
		<td class="description"><div>
			<a href="#$_hasAlpha" class="anchor">#</a>

			<div class="description short">
				
			</div>

			<div class="description detailed hidden">
				

			</div>
		</div></td>
	</tr>
	</table>


</div>

	<div id="footer">
		RedMVC Framework API documentation generated by <a href="http://apigen.org">ApiGen 2.4.0</a>
	</div>
</div>
</div>
</body>
</html>
